<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="bootstrap/css/bootstrap.css">
<!DOCTYPE>
<html>
  <head>
    <base href="<%=basePath%>">
    <title></title>
<style type="text/css">
 B{ text-align: center;
}
</style>
  </head>
  <body>
  	<h3>修改新闻</h3>
	<form action="News.do?op=updated&newid=${requestScope.news.newid }" method="post">
		标题：<input type="text" name="title" value="${requestScope.news.title }">
		<hr>
		是否推荐：<input type="radio" name="hot" value="1" ${requestScope.news.recommended==1 ?  "checked" : ""}>推荐
				 <input type="radio" name="hot" value="0" ${requestScope.news.recommended==0 ?  "checked" : ""}>不推荐
		<hr>
		新闻类型：
		<select name="types" >
			<c:forEach var="types" items="${ requestScope.typeslist }">
				<option value="${types.typeid}"  ${types.typeid==requestScope.news.types.typeid ? "selected" : "" }>${types.title}</option>
			</c:forEach>
		</select>
		<hr>
		<div class="row">
			<div style="margin-left: 350px; margin-bottom: 5px;margin-top: 5px"><b>新闻正文</b></div>
			<div class="col-md-12">
				<script id="container" name="content" type="text/plain"> 
				${requestScope.news.content}	
    			</script>
			    <!-- 配置文件 -->
			    <script type="text/javascript" src="ueditor/ueditor.config.js"></script>
			    <!-- 编辑器源码文件 -->
			    <script type="text/javascript" src="ueditor/ueditor.all.js"></script>
			    <!-- 实例化编辑器 -->
		    	<script type="text/javascript">
		        var ue = UE.getEditor('container');
		        </script>
			</div>
		</div>
		关键字：<input type="text" name="keyword" value="${requestScope.news.keywords}"><hr>
		<button type="submit" style="margin-left: 240px; margin-top: -50px;" class="btn btn-default">提交</button>
		<button type="reset" style="margin-left: 200px; margin-top: -50px;" class="btn btn-default">重置</button>
	</form>
       <div style="margin-left: 350px;"><h5>${ requestScope.newsadd==null ? "" : "提交失败"}</h5></div>
  </body>
</html>

